var common = {}
common.login=function (){
    var account = $('#mnemonic_code').val();
    var pass = $('#pass').val();
    if (account=='' || pass==''){
        alert('请完整填写信息')
        return
    }
    $('#submit').click(function (){
        var temp = {}
        temp.mnemonic_code = account
        temp.pass = pass
        $.post('common/loginVerifyS',temp,function (result){
            if (result){
                location.href="mainPageS.html"
            }else {
                $('#tip').html('账号或密码不正确')
                $('#pass').val('')
            }
        })
    })
}
common.commonModalDialog=function (title,view,clickEvent){
    $('#common-modal .modal-dialog .modal-content .modal-header .modal-title').html(title)
    $('#common-modal .modal-dialog .modal-content .common-modal-body').html(view)
    $('#common-modal .modal-dialog .modal-content .modal-footer #modal-submit-button').click(clickEvent)
    $('#common-modal').modal('show')
}

common.commonModalDialogClearSubmitButtonBind=function (){
    $('#common-modal .modal-dialog .modal-content .modal-footer #modal-submit-button').unbind('click')
}
common.commonModalDialogClose=function (){
    $('#common-modal').modal('hide')
}
common.commonModalContentChange=function (view){
    $('#common-modal .modal-dialog .modal-content .common-modal-body').html(view)
}
common.commonModalSizeSet=function (size){
    $('#common-modal #modal-dialog').addClass(size)
}
common.commonModalDefaultSize=function (){
    $('#common-modal #modal-dialog').removeClass("modal-lg")
    $('#common-modal #modal-dialog').removeClass("modal-sm")
}